package com.springCloud.controller;

import com.springCloud.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
public class OrderController {

    @Autowired
    private  OrderService orderService;

    @RequestMapping(value = "/order" )
    public String order() {
       // ServiceInstance instance = client.getLocalServiceInstance();
        log.info("被调用了111");
        return orderService.order1();

    }
}
